$(function(){
    initLayerDate("#startCreateTime",true);
    initLayerDate("#endCreateTime",true);
    queryLogList(1);
    $('body').on('click','#refresh',function(){
        queryLogList(1)
    }).on("click","i.fa-eye",function(){
        var that = $(this).parent("a");


        var  html ='<div class="m-t-lg">' +
            '        <dl class="dl-horizontal">' +
            '            <dt>请求地址：</dt>' +
            '            <dd class="m-r"><span class="fs12 c-4e">'+that.data("url")+'</span></dd>' +
            '        </dl>\n' +
            '        <div class="hr-line-dashed"></div>' +
            '' +
            '        <dl class="dl-horizontal">' +
            '            <dt>请求参数：</dt>' +
            '            <dd class="m-r"><span class="fs12 c-4e">'+that.data("params")+'</span></dd>' +
            '        </dl>\n'+'</div>'
        parent.layer.open({
            area: ['600px', '570px'],
            btn: ['关闭'],
            content: html,
            maxmin: true,
            shade: [0.3, '#000'],
            shadeClose: false,
            title: '查看操作日志请求参数与地址',
            type: 1,
            yes: function (index) {
                parent.layer.close(index);
            }
        });
    }).on("click","#btn2",function(){
        queryLogList(1)
    });
    function queryLogList(pageNo) {
        var params = $("#search-form").serializeJSON();
        params = JSON.stringify(params);
        var obj = {
            url: baseloaction + '/admin/manage/log/findUserRoleListPage',//请求URL
            contextId: 'oc-ibox-content',//响应内容页面设置内容ID
            params: params,//请求参数
            pageNo: pageNo,//页码
            pageCall: queryLogList, //分页回调加载数据(点击上下页时调用,该方法也在加载页面完成时调用)
            callback: function () {//数据加载完成回调
            }
        };
        ajaxGetListData(obj);
    }
})